# -*- perl -*-

# t/001_load.t - check module loading and create testing directory

use lib 'lib';


use Test::More tests => 39;

BEGIN {
    use_ok('OOXML::Utils::Package');
}

my $package = OOXML::Utils::Package->new();
isa_ok($package, 'OOXML::Utils::Package');

my @valid = qw/ foo Foo FoO !foo foo! $foo f$oO foo%oo %%% &foo foo'bar (foo)
foo*foo foo+bar +++ *&foo&()()bar 10 99:foo -foo- _---_ .foo ._-&%=;:@ @@@
 ~Foo %20%3C%3c%7c %5B-%20 /;

foreach my $name (@valid) {
    is($package->is_part_name_valid($name), 1, "Is $name a valid part name?");
}

my @invalid = qw( foo^ [foo] fo{o {} /foo/ \foo\bar <foo> ><> ?foo ? "foo" );
foreach my $name (@invalid) {
    is($package->is_part_name_valid($name), 0, "Is $name a valid part name?");
}

